package edu.gdcc.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Project Name:springmvc-demo <br/>
 * Package Name:edu.gdcc.demo.controller <br/>
 * Date:2018/6/21 11:22 <br/>
 * <b>Description:</b> TODO: 描述该类的作用 <br/>
 *
 * @author <a href="mailto:xiezy@eastcom-sw.com">Izzy.X</a><br/>
 * Copyright Notice =========================================================
 * This file contains proprietary information of Eastcom Technologies Co. Ltd.
 * Copying or reproduction without prior written approval is prohibited.
 * Copyright (c) 2018 =======================================================
 */
@Controller
public class HelloWorldController {
    @RequestMapping(value = "/helloWorld",method=RequestMethod.GET)
    public String helloWorld(Model model) {
        model.addAttribute("message", "Hello World,this is a message");
        return "helloWorld";
    }
    @RequestMapping(value = "/helloWorld2",method=RequestMethod.GET)
    @ResponseBody
    public String helloWorld2() {
        return "helloWorld,了哈";
    }
}
